import request from "@/utils/request";

// 预警版本号 错误码300301
export function listversion(params) {
    return request({
        url: "/energy/warning-config/versionList",
        method: "get",
        params,
    });
}

// 预警列表 错误码300302
export function list(params) {
    return request({
        url: "/energy/warning-config/list",
        method: "get",
        params,
    });
}

// 获取配置列表 错误码300303
export function instructList(params) {
    return request({
        url: "/energy/warning-config/instructList",
        method: "get",
        params,
    });
}

// 添加配置 错误码300304
export function addWarningEmanage(data) {
    return request({
        url: "/energy/warning-config/instruct",
        method: "post",
        data,
    });
}

// 公示确认 错误码300305
export function auditConfirmPublicity(id) {
    return request({
        url: `/energy/warning-config/auditConfirmPublicity/${id}`,
        method: "PATCH",
    });
}

// 正式发布 错误码300306
export function auditGoPublish(id) {
    return request({
        url: `/energy/warning-config/auditGoPublish/${id}`,
        method: "PATCH",
    });
}
